package server.container;

import java.util.HashMap;
import java.util.Map;

public class Mapper {

    private Mapper(){

    }

    private Map<String,Host> maphost = new HashMap<>();

    public void addHost(String path, Host host) {
        maphost.put(path,host);
    }

    public Host getHostByHostPath(String host) {
       return maphost.get(host);
    }

    static class Holder {
        public static final  Mapper instance = new Mapper();
    }

    public static Mapper  getInstance(){
        return  Holder.instance;
    }


}
